package com.example.midushop.service.category.impl;

import com.example.midushop.entity.category.CategoryThree;
import com.example.midushop.mapper.category.CategoryThreeMapper;
import com.example.midushop.service.category.CategoryThreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


/**
 * 三级分类信息服务接口实现类
 */
@Service
public class CategoryThreeServiceImpl implements CategoryThreeService {
    @Autowired
    CategoryThreeMapper categoryThreeMapper;

    /**
     * 根据二级分类编号查询三级分类信息，如果不传三级分类ID则返回所有结果
     * @param categoryTwo_id
     * @param categoryThree_id
     * @return 返回List集合，三级分类信息
     */
    @Override
    public List<CategoryThree> findCategoryThreeAll(long categoryTwo_id, long categoryThree_id,String categoryThree_name) {
        return categoryThreeMapper.findCategoryThreeAll(categoryTwo_id,categoryThree_id,categoryThree_name);
    }

    @Override
    public int addCategoryThree(long CategoryTwo_id, String CategoryThree_name, int sort, Date create_time, Date update_time) {
        return categoryThreeMapper.addCategoryThree(CategoryTwo_id,CategoryThree_name,sort,create_time,update_time);
    }

}
